1. Technical Field
The present invention relates to a data storing method for a non-volatile memory module and a memory controller and a memory storage apparatus using the same.
2. Description of Related Art
The growth of digital cameras, mobile phones, and MP3 players has been rapid in recent years. Consequently, the consumers' demand for storage media has increased tremendously. Rewritable non-volatile memory is one of the most adaptable memories for portable electronic products such as laptop computer due to its data non-volatility, low power consumption, small volume, non-mechanical structure and high read/write speed. A solid state drive is a storage apparatus adopting flash memory as storage medium. For these reasons, flash memory has become an important part of the electronic industries.
Generally, a flash memory module of a flash memory storage apparatus is divided into a plurality of physical blocks, in which the physical blocks are further divided into a plurality of physical pages. In the flash memory, the physical block is an erasing unit and the physical page is a writing unit. Since only unidirectional programming (i.e. by programming the value of the memory cell from 1 to 0) may be performed to programming memory cells of the flash memory, a direct writing to a programmed physical page (i.e. page that is stored with old data) may not be performed before such physical page has been erased for re-programming. In particular, since the physical block is used as a unit for erasing in the flash memory, when an erasing operation is performed to the physical page stored with old data, the physical block that contains the physical page is erased entirely. Therefore, the physical blocks of the flash memory module are divided into a data area and a spare area, in which the physical blocks in the data area are physical blocks that already stored with data and the physical blocks in the spare area are physical block not being used. When the host system is writing data to the flash memory, the control circuit of the flash memory storage apparatus selects a physical block from the spare area for writing data and associates the selected physical blocks with the data area. In addition, after an erasing operation to the physical blocks of the data area is performed, the erased physical blocks are associated with the spare area.
In the host system, a writing operation is performed through logical addresses, and a sequence for writing data to the logical addresses may not always in accordance to an order of the logical addresses. Base on the above, how to effectively recording mapping relations between the logical addresses and the physical blocks to increase the speed for storing data is one of the major subjects in the industry.
Nothing herein should be construed as an admission of knowledge in the prior art of any portion of the present invention. Furthermore, citation or identification of any document in this application is not an admission that such document is available as prior art to the present invention, or that any reference forms a part of the common general knowledge in the art.